home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / APP / S-Z / The Regulator.cpt / The Regulator source / XPRAM.h < prev   
Text File  |  1992-06-19  |  1KB  |  40 lines

  1. /* Extended Parameter RAM locations
  2. **
  3. ** of course, any of these can change at any time, and they aren't official
  4. ** nor from Apple.  I figured these out by disassembling code.  This stuff WILL
  5. ** change in the future.  Don't base any products on this, or you'll be very
  6. ** sorry (and DTS will laugh in your face…)  Don't ask Apple for help on this
  7. ** stuff… they have no further information they are willing to disclose.
  8. */
  9.  
  10. #define    PRAM_BASE            0x70
  11.  
  12. #define prSysSleep_Offset    0x00
  13. #define prHDSleep_Offset    0x01
  14. #define prFlags_Offset        0x02
  15.  
  16. #define prFlags_Offset_Portable        0x07
  17.  
  18. #define        kPowerSave        0x01 /* mask in prFlags */
  19.  
  20. /* Inline routines */
  21. pascal void SetPRAM(short loc, short numBytes, char* valPtr)={0x205F,0x201F,0xA052};
  22.     /*
  23.         move.l    (sp)+,d0            ; write x bytes at given location
  24.         move.l    (sp)+,a0            ; a0 points at data
  25.         _WriteXPRam
  26.     */
  27. pascal void ReadPRAM(short loc, short numBytes, char* valPtr)={0x205F,0x201F,0xA051};
  28.     /*
  29.         move.l    (sp)+,d0            ; read x bytes at given location
  30.         move.l    (sp)+,a0            ; a0 points at data
  31.         _ReadXPRam
  32.     */
  33.  
  34. /* from PowerMgr.h */
  35. /* access to Power Manager's local variables */
  36. #define        PMgrLBase        0xd18
  37. #define        PMgrLocal(offset) (*((char *)(*((long *)PMgrLBase)+(offset))))
  38. #define        TOdirtyFlag        0x11
  39.  
  40.